import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/pages/resources/Home'
import ImportHome from '@/pages/resources/ImportHome'
import Personal from '@/pages/personal/Personal'
import AddMountSlot from '@/components/publish-order/AddMountSlot'
import Shopping from '@/pages/cart/Shopping'
import ResDetail from '@/pages/resources/ResDetail'
import ResList from '@/pages/resources/ResourceList'
import Search from '@/pages/resources/SearchResult'
import AddSlot from '@/components/publish-order/AddSlot'
import Me from '@/components/publish-order/Me'
import CustomSlot from '@/components/custom/CustomSlot'
import CustomOrder from '@/components/custom/CustomOrder'
import Difference from '@/components/custom/Difference'
import Register from '@/pages/personal/Register'
import Statement from '@/pages/personal/Statement'
import StatementEng from '@/pages/personal/StatementEng'
import Document from '@/pages/document/Document'
import Uninstall from '@/pages/document/Uninstall'
import UserCenter from "@/pages/personal/UserCenter";

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/home',
      name: 'Home',
    component: Home
    },
    {
      path: '/import-home',
      name: 'ImportHome',
      component: ImportHome
    },
    {
      path: '/personal',
      name: 'Personal',
      component: Personal
    },
    {
      path: '/shopping',
      name: 'Shopping',
      component: Shopping,
      meta: {
        title: '购物车'
      }
    },
    {
      path: '/detail',
      name: 'Detail',
      component: ResDetail,
      meta: {
        title: '资源详情',
      }
    },
    {
      path: '/addMountSlot',
      name: 'AddMountSlot',
      component: AddMountSlot
    },
    {
      path: '/list',
      name: 'List',
      component: ResList,
      meta: {
        title: '资源列表'
      }
    },
    {
      path: '/search',
      name: 'Search',
      component: Search,
      meta: {
        title: '查询结果'
      }
    },
    {
      path: '/addSlot',
      name: 'AddSlot',
      component: AddSlot
    },
    {
      path: '/me',
      name: 'Me',
      component: Me
    },
    {
      path: '/custom',
      name: 'CustomSlot',
      component: CustomSlot
    },
    {
      path: '/customOrder',
      name: 'CustomOrder',
      component: CustomOrder
    },
    {
      path: '/difference',
      name: 'Difference',
      component: Difference
    },
    {
      path: '/register',
      name: 'Register',
      component: Register
    },
    {
      path: '/statement',
      name: 'Statement',
      component: Statement
    },
    {
      path: '/statementEng',
      name: 'StatementEng',
      component: StatementEng
    },
    {
      path: '/document',
      name: 'Document',
      component: Document
    },
    {
      path: '/uninstall',
      name: 'Uninstall',
      component: Uninstall
    },
    {
      path: '/user/center',
      name: 'UserCenter',
      component: UserCenter
    }
  ]
})
